package com.activity.fragment;

import android.app.Activity;
import android.view.Display;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.api.viewModel.LoginVM;
import com.example.apple.ddhr_new.R;
import com.example.lzbase.BaseViewModelFragment;
import com.gyf.barlibrary.ImmersionBar;

import butterknife.BindView;

public class MessageFragment extends BaseViewModelFragment<LoginVM> {

    @BindView(R.id.iv_icon)
    ImageView ivIcon;

    @Override
    public int getLayoutId() {
        return R.layout.fragment_message;
    }

    @Override
    public void initStatusBar() {
        ImmersionBar.with(this)
                .titleBar(rootView.findViewById(R.id.nav_bar))
                .statusBarDarkFont(true)
                .flymeOSStatusBarFontColor(R.color.black)
                .init();
    }

    @Override
    public void createView() {
        super.createView();
        ImageView imageView= ivIcon;
        LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) imageView.getLayoutParams();
        WindowManager m = ((Activity) mContext).getWindowManager();
        Display d = m.getDefaultDisplay(); // 获取屏幕宽、高用
        params.height = (int) (d.getWidth()*(4992.0/2484.0));
        imageView.setLayoutParams(params);
    }
}
